<?php
header('content-type:text/html;charset=utf8');
$account=$_POST['account'];
$pwd=$_POST['pwd'];
$nickname=$_POST['nickname'];
$mail=$_POST['mail'];
//var_dump($account);die;
$datetime=time();

$link =@mysql_connect('127.0.0.1','root','root');
if(!$link){
    die('连接失败，错误号为：'.mysql_errno().'失败原因：'.mysql_error());
}
mysql_select_db('blog');
mysql_set_charset('utf8');
$sql = "insert into member(`account`,`pwd`,`nickname`,`mail`) values('$account','$pwd','$nickname','$mail')";
//$sql = "insert into member(`account`,`pwd`,`nickname`,`email`,`status`) values('$account','$pwd','$nickname','$email','$status')";
$res = mysql_query($sql);

//$arr=$arr[0];
if($res){

 echo '<script>alert("注册成功");window.location.href="/qiantai/index.php"</script>';
    
}else{
    
   echo '<script>alert("注册失败");window.location.href="/qiantai/zhuce.php"</script>';

}
mysql_free_result($res);
mysql_close();
?>